﻿using NCP.Model;
using NCP.Service;
using System.Collections.Generic;
using System.Web.Mvc;

namespace WebApp.Controllers
{
    public class PmsController : BaseController<Permission>
    {
        private PermissionService _service;
        public PmsController(PermissionService service)
        {
            _service = service;
            _baseService = service;
        }
        // GET: Pms
        public ActionResult Index()
        {
            return View();
        }

        //添加权限
        public ActionResult PmsAdd()
        {
            return View();
        }
        //获取父权限列表
        public ActionResult GetsParentPms()
        {
            List<Permission> pmsList = _service.GetsPms();
            LayData ajaxRst = new LayData("0", "获取成功", pmsList, pmsList.Count);
            return Json(ajaxRst);
        }
    }
}